package com.cskaoyan.mapper;

import com.cskaoyan.vo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    //没有使用@Param注解，collection里写array；如果参数是List<Integer> ，collection里写list
    User[] selectUsersByIdArray(Integer[] ids);

    //如果使用了@Param注解，collection属性写@Param注解的value属性值
    User[] selectUsersByIdArrayParam(@Param("ids") Integer[] ids);

    int insertUsers(List<User> userList);

    int insertUsersParam(@Param("userList") List<User> userList);

    int insertUser(@Param("user") User user);


    int insertUserUseGeneratedKeys(@Param("user") User user);

    int insertUsersParamUseGeneratedKeys(@Param("users") List<User> userList);

}
